package cn.appsys.dao.appInfoDao;

import cn.appsys.pojo.AppInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AppInfoMapper {
    //添加
    int addAppInfo(AppInfo appInfo) throws Exception;

    //根据apk名称查询信息
    AppInfo findByAPKName(@Param("APKName")String APKName) throws Exception;

    //根据条件查询所有软件信息（附带分页）
    List<AppInfo> findAllByMsg(@Param("indexNo")int indexNo,
                               @Param("pageSize")int pageSize,
                               @Param("swName")String swName,
                               @Param("status")Integer status,
                               @Param("flatformId")Integer flatformId,
                               @Param("pid1")Integer pid1,
                               @Param("pid2")Integer pid2,
                               @Param("pid3")Integer pid3) throws Exception;

    //根据条件查询所有软件信息的总条数
    int getCountByMsg(@Param("swName")String swName,
                   @Param("status")Integer status,
                   @Param("flatformId")Integer flatformId,
                   @Param("pid1")Integer pid1,
                   @Param("pid2")Integer pid2,
                   @Param("pid3")Integer pid3) throws Exception;
    //修改信息
    public int modify(AppInfo appInfo)throws Exception;

    public AppInfo getAppInfo(@Param(value = "id") Integer id, @Param(value = "APKName") String APKName)throws Exception;

    public int deleteAppLogo(@Param(value = "id") Integer id)throws Exception;

    //查询App信息
    public AppInfo getAppInfo(@Param(value="id")Integer id)throws Exception;

    //删除app信息
    public int deleteAppInfoById(@Param(value="id")Integer delId)throws Exception;


    //上架下架
    //public int updateSatus(@Param(value="status")Integer status,@Param(value="id")Integer id)throws Exception;

}
